<!--
 * @Author: your name
 * @Date: 2021-07-22 20:30:49
 * @LastEditTime: 2021-08-13 09:07:56
 * @LastEditors:
 * @Description: In User Settings Edit
 * @FilePath: \ChileCat_Admin_Web\src\App.vue
-->
<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  // ===========================下面是解决刷新页面丢失vuex数据
  created() {
    // 在页面加载时读取sessionStorage里的状态信息
    if (sessionStorage.getItem('store')) {
      this.$store.replaceState(
        Object.assign(
          {},
          this.$store.state,
          JSON.parse(sessionStorage.getItem('store'))
        )
      )
    }
    // 在页面刷新时将vuex里的信息保存到sessionStorage里
    window.addEventListener('beforeunload', () => {
      sessionStorage.setItem('store', JSON.stringify(this.$store.state))
    })
  }
}
</script>
<style lang="scss">
// 变灰
	// html{
	// 	-webkit-filter : grayscale(100%);
	// 	-moz-filter: grayscale(100%);
	// 	-o-filter: grayscale(100%);
	// 	filter: grayscale(100%);
	// 	filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
	// }
// import
.el-col {
  border-radius: 4px;
}
.bg-purple-dark {
  background: #99a9bf;
}
.bg-purple {
  background: #d3dce6;
}
.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
}
</style>
<style lang="scss" scoped>
#app {
  // padding: 5px;
  // background-color: $menuBg;
}
</style>
